/***********************************************************************
 * Module:  SanPhamTaiQuay.cs
 * Author:  Tuan Nguyen
 * Purpose: Definition of the Class SanPhamTaiQuay
 ***********************************************************************/

using System;

public class SanPhamTaiQuay
{
   public long SoLuongTonQuay;
   public long GiaSale;
   public DateTime NgayLenQuay;
   public DateTime NgayHetHan;
   
   public QuayHang quayHang;
   
   /// <pdGenerated>default parent getter</pdGenerated>
   public QuayHang GetQuayHang()
   {
      return quayHang;
   }
   
   /// <pdGenerated>default parent setter</pdGenerated>
   /// <param>newQuayHang</param>
   public void SetQuayHang(QuayHang newQuayHang)
   {
      if (this.quayHang != newQuayHang)
      {
         if (this.quayHang != null)
         {
            QuayHang oldQuayHang = this.quayHang;
            this.quayHang = null;
            oldQuayHang.RemoveSanPhamTaiQuay(this);
         }
         if (newQuayHang != null)
         {
            this.quayHang = newQuayHang;
            this.quayHang.AddSanPhamTaiQuay(this);
         }
      }
   }
   public KhoThanhPham khoThanhPham;
   
   /// <pdGenerated>default parent getter</pdGenerated>
   public KhoThanhPham GetKhoThanhPham()
   {
      return khoThanhPham;
   }
   
   /// <pdGenerated>default parent setter</pdGenerated>
   /// <param>newKhoThanhPham</param>
   public void SetKhoThanhPham(KhoThanhPham newKhoThanhPham)
   {
      if (this.khoThanhPham != newKhoThanhPham)
      {
         if (this.khoThanhPham != null)
         {
            KhoThanhPham oldKhoThanhPham = this.khoThanhPham;
            this.khoThanhPham = null;
            oldKhoThanhPham.RemoveSanPhamTaiQuay(this);
         }
         if (newKhoThanhPham != null)
         {
            this.khoThanhPham = newKhoThanhPham;
            this.khoThanhPham.AddSanPhamTaiQuay(this);
         }
      }
   }
   public Banh banh;
   
   /// <pdGenerated>default parent getter</pdGenerated>
   public Banh GetBanh()
   {
      return banh;
   }
   
   /// <pdGenerated>default parent setter</pdGenerated>
   /// <param>newBanh</param>
   public void SetBanh(Banh newBanh)
   {
      if (this.banh != newBanh)
      {
         if (this.banh != null)
         {
            Banh oldBanh = this.banh;
            this.banh = null;
            oldBanh.RemoveSanPhamTaiQuay(this);
         }
         if (newBanh != null)
         {
            this.banh = newBanh;
            this.banh.AddSanPhamTaiQuay(this);
         }
      }
   }

}